package com.ruowei.modules.member.repository;

import com.ruowei.common.repository.BaseRepository;
import com.ruowei.modules.member.domain.MemberReceivingInfo;
import com.ruowei.modules.member.domain.QMemberReceivingInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface MemberReceivingInfoRepository extends BaseRepository<Long, MemberReceivingInfo, QMemberReceivingInfo> {

    List<MemberReceivingInfo> findAllByMemberCode(String openId);

    Optional<MemberReceivingInfo> findByMemberCodeAndInfoCode(String memberCode, String infoCode);

    MemberReceivingInfo findByInfoCode(String infoCode);
}
